package com.lc.api.impl;

import com.lc.api.DemoService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;

/**
 * @author liuc
 * @date 2021/6/16
 * @description
 **/
@Service
public class DemoServiceImpl implements DemoService {
    @Override
    public int methodA() {
        int time = ThreadLocalRandom.current().nextInt(100);
        try {
            Thread.sleep(time);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return time;
    }

    @Override
    public int methodB() {
        int time = ThreadLocalRandom.current().nextInt(100);
        try {
            Thread.sleep(time);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return time;
    }

    @Override
    public int methodC() {
        int time = ThreadLocalRandom.current().nextInt(100);
        try {
            Thread.sleep(time);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return time;
    }
}
